//
//  HHScrollPageView.h
//  Flower
//
//  Created by 花花 on 2016/12/5.
//  Copyright © 2016年 花花. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HHContentView.h"
#import "HHTitleView.h"

typedef void(^tempBtnOnClick)(UIButton *tempbtn);
@interface HHScrollPageView : UIView


@property(nonatomic, copy) tempBtnOnClick tempBtnOnClock;

@property(nonatomic, weak,readonly) HHContentView *contentView;

@property(nonatomic, weak,readonly) HHScrollSegmentView *segmentView;

//必须设置代理并实现相应方法
@property(nonatomic, weak) id<HHScrollPageViewDelegate>delegate;

- (instancetype)initWithFrame:(CGRect)frame segmentStyle:(HHSegmentStyle *)segmetStyle titles:(NSArray<NSString *>*)titles parentViewController:(UIViewController *)parentViewController delegate:(id<HHScrollPageViewDelegate>)delegate;

//给外界设置选中的下标的方法
- (void)setSelectedIndex:(NSInteger)selectedIndex animated:(BOOL)animated;

//给外界重新设置的标题的方法(同事会重新加载页面的内容)
-(void)reloadWithNewTitles:(NSArray<NSString *>*)newTitles;

@end
